<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	<p>点击下面的按钮来显示今天是周几：</p>
    <button onclick="myFunction()">点击这里</button>
    <p id="demo"></p>
    <script type="text/javascript">
    	function myFunction(){
    		var x;
    		var d=new Date().getDay();
    		switch(d){
    			case 0:
    			    x="Today it's Sunday";
    			    break;
                case 6:
                    x="Today it's Saturday";
                    break;
                default:
                x="Looking forward to the Weekend";
    		}
    		document.getElementById('demo').innerHTML=x;
    	}
    </script>
</body>
</html>